<template>
  <div class="home">
      {{ $store.state.list }}
    <button @click="init">点击异步获取数据</button>
  </div>
</template>

<script>

export default {
  name: 'Home',
  methods: {
    init() {
      // mutations     this.$store.commit("函数名称")

      // actions       this.$store.dispatch("函数名称")
      // console.log(this.$store)
      this.$store.dispatch("init")
    }
  }
}
</script>
